<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts-6种主题</title>
    <!-- 引入 echarts.js -->
    <script src="../js/echarts.min.js"></script>
    <script src="../js/vintage.js"></script>
    <script src="../js/dark.js"></script>
    <script src="../js/macarons.js"></script>
    <script src="../js/infographic.js"></script>
    <script src="../js/shine.js"></script>
    <script src="../js/roma.js"></script>

    <style>
        .d-flex{
            display:flex;
            justify-content: start;
            align-items: center;
            flex-wrap: wrap;
        }

        span{
            text-align: center;
            padding-left: 45%;
            font-size: 25px;
        }

        #main,#main2,#main3,#main4,#main5,#main6{
            margin:30px 30px;
        }
    </style>
</head>
<body>
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div class="d-flex">
        <div>
            <span style="color:rgb(234,205,151)">vintage</span>
            <div id="main" style="width: 600px;height:400px;"></div>
        </div>
        
        <div>
            <span style="color:rgb(51,51,51)">dark</span>
            <div id="main2" style="width: 600px;height:400px;"></div>
        </div>        
        
        <div>
            <span style="color:rgb(98,199,202)">macarons</span>
            <div id="main3" style="width: 600px;height:400px;"></div>
        </div>
        

        <div>
            <span style="color:rgb(54,114,123)">infographic</span>
            <div id="main4" style="width: 600px;height:400px;"></div>
        </div>
        
        <div>
            <span style="color:rgb(193,46,52)">shine</span>
        <div id="main5" style="width: 600px;height:400px;"></div>
        </div>
        
        <div>
            <span style="color:rgb(225,45,84)">roma</span>
            <div id="main6" style="width: 600px;height:400px;"></div>
        </div>
        


    </div>
    
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'),'vintage');
        var myChart2 = echarts.init(document.getElementById('main2'),'dark');
        var myChart3 = echarts.init(document.getElementById('main3'),'macarons');
        var myChart4 = echarts.init(document.getElementById('main4'),'infographic');
        var myChart5 = echarts.init(document.getElementById('main5'),'shine');
        var myChart6 = echarts.init(document.getElementById('main6'),'roma');

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: 'ECharts 入门示例'
            },
            tooltip: {},
            legend: {
                data:['销量']
            },
            xAxis: {
                data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
            },
            yAxis: {},
            series: [{
                name: '销量',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        myChart2.setOption(option);
        myChart3.setOption(option);
        myChart4.setOption(option);
        myChart5.setOption(option);
        myChart6.setOption(option);
    </script>
</body>
</html>